package com.snack.shop.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.snack.shop.dto.FeedbackSubmitRequest;
import com.snack.shop.dto.FeedbackAppendRequest;
import com.snack.shop.dto.FeedbackReplyRequest;
import com.snack.shop.entity.Feedback;
import com.snack.shop.entity.FeedbackReply;

import java.util.List;

/**
 * 意见反馈服务接口
 */
public interface FeedbackService {

    /**
     * 提交反馈
     */
    Feedback submitFeedback(Long userId, FeedbackSubmitRequest request);

    /**
     * 获取反馈列表（用户端）
     */
    Page<Feedback> getUserFeedbackPage(Long userId, Integer status, Integer pageNum, Integer pageSize);

    /**
     * 获取反馈详情
     */
    Feedback getFeedbackDetail(Long feedbackId, Long userId);

    /**
     * 追加反馈
     */
    void appendFeedback(Long userId, Long feedbackId, FeedbackAppendRequest request);

    /**
     * 标记为已读
     */
    void markAsRead(Long feedbackId, Long userId);

    /**
     * 获取反馈列表（管理端）
     */
    Page<Feedback> getAdminFeedbackPage(Integer type, Integer status, Integer pageNum, Integer pageSize);

    /**
     * 更新反馈状态
     */
    void updateFeedbackStatus(Long feedbackId, Integer status);

    /**
     * 平台回复反馈
     */
    void replyFeedback(Long feedbackId, Long handlerId, FeedbackReplyRequest request);

    /**
     * 获取反馈回复列表
     */
    List<FeedbackReply> getFeedbackReplies(Long feedbackId);
}
